package com.quzitech.efest.utils;

import com.quzitech.efest.protocol.ConCreteCmd;
import com.quzitech.efest.protocol.ResponseCmd;
import com.quzitech.efest.protocol.StringUtil;
import com.quzitech.efest.protocol.ResponseCmd.IRESTYPE;
import com.quzitech.efest.view.BatteryAmount;

public class getBatteryReminderParamUtil {
	public static String set(String msg) {
		if (StringUtil.getLocatedString(IRESTYPE.ResNTF, msg) != null) {
			switch (Integer.parseInt(String.valueOf(StringUtil
					.getLocatedString(IRESTYPE.ResNTF, msg).charAt(1)))) {
			case ConCreteCmd.IPASS.PASSNO1:
				switch (Integer.parseInt(String.valueOf(StringUtil
						.getLocatedString(IRESTYPE.ResNTF, msg).charAt(3)))) {
				case ResponseCmd.IREMAINDER.FILL:
					return String.valueOf(ConCreteCmd.IPASS.PASSNO1)
							+ String.valueOf(ResponseCmd.IREMAINDER.FILL);

				case ResponseCmd.IREMAINDER.REVERSER:
					return String.valueOf(ConCreteCmd.IPASS.PASSNO1)
							+ String.valueOf(ResponseCmd.IREMAINDER.REVERSER);

				}
				break;
			case ConCreteCmd.IPASS.PASSNO2:
				switch (Integer.parseInt(String.valueOf(StringUtil
						.getLocatedString(IRESTYPE.ResNTF, msg).charAt(3)))) {
				case ResponseCmd.IREMAINDER.FILL:
					return String.valueOf(ConCreteCmd.IPASS.PASSNO2)
							+ String.valueOf(ResponseCmd.IREMAINDER.FILL);

				case ResponseCmd.IREMAINDER.REVERSER:
					return String.valueOf(ConCreteCmd.IPASS.PASSNO2)
							+ String.valueOf(ResponseCmd.IREMAINDER.REVERSER);

				}
				break;
			case ConCreteCmd.IPASS.PASSNO3:
				switch (Integer.parseInt(String.valueOf(StringUtil
						.getLocatedString(IRESTYPE.ResNTF, msg).charAt(3)))) {
				case ResponseCmd.IREMAINDER.FILL:

					return String.valueOf(ConCreteCmd.IPASS.PASSNO3)
							+ String.valueOf(ResponseCmd.IREMAINDER.FILL);

				case ResponseCmd.IREMAINDER.REVERSER:

					return String.valueOf(ConCreteCmd.IPASS.PASSNO3)
							+ String.valueOf(ResponseCmd.IREMAINDER.REVERSER);

				}
				break;
			case ConCreteCmd.IPASS.PASSNO4:
				switch (Integer.parseInt(String.valueOf(StringUtil
						.getLocatedString(IRESTYPE.ResNTF, msg).charAt(3)))) {
				case ResponseCmd.IREMAINDER.FILL:
					return String.valueOf(ConCreteCmd.IPASS.PASSNO4)
							+ String.valueOf(ResponseCmd.IREMAINDER.FILL);
				case ResponseCmd.IREMAINDER.REVERSER:

					return String.valueOf(ConCreteCmd.IPASS.PASSNO4)
							+ String.valueOf(ResponseCmd.IREMAINDER.REVERSER);

				}
				break;

			}
		}
		return "";
	}
}
